package com.irdstudio.efp.e4a.service.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.irdstudio.efp.e4a.service.domain.SRuleCollDtl;
/**
 * <p>DAO interface:系统规则集明细表				<p>
 * @author Cytus_
 * @date 2018-05-03
 */
public interface SRuleCollDtlDao {
	
	public int insertSRuleCollDtl(SRuleCollDtl sRuleCollDtl);
	
	public int insertsByRuleIds(Map<String, Object> paramMap);
	
	public int deleteByPk(SRuleCollDtl sRuleCollDtl);
	
	public int updateByPk(SRuleCollDtl sRuleCollDtl);
	
	public SRuleCollDtl queryByPk(SRuleCollDtl sRuleCollDtl);
	
	public List<SRuleCollDtl> queryAllOwnerByPage(SRuleCollDtl sRuleCollDtl);
	
	public List<SRuleCollDtl> queryAllCurrOrgByPage(SRuleCollDtl sRuleCollDtl);
	
	public List<SRuleCollDtl> queryAllCurrDownOrgByPage(SRuleCollDtl sRuleCollDtl);
	
	public List<SRuleCollDtl> querySRuleCollDtlAllByCollIdByPage(SRuleCollDtl sRuleCollDtl);
	
	public int deleteByCollId(String collId);
	/**
	 * 插入详情规则的总数
	 * @param paramMap
	 * @return
	 */
	public List<SRuleCollDtl> queryInsertsByRuleIdsCount(Map<String, Object> paramMap);
	/**
	 * 查询 规则集下所有的规则配置明细
	 * @param ruleCollId
	 * @return
	 */
	public List<SRuleCollDtl> queryAllByCollId(@Param("ruleCollId") String ruleCollId);
	/**
	 * 批量插入规则集详细
	 * @param ruleCollDtls
	 * @return
	 */
	public int insertMoreRuleCollDtls(@Param("ruleCollDtls")List<SRuleCollDtl> ruleCollDtls );

	/**
	 * 查询规则集下的所有的子规则总数
	 * @param ruleCollId 规则集ID
	 * @return 子规则总数
	 */
	int queryRuleCollDltCount(@Param("ruleCollId") String ruleCollId);
}